PAGE 1

Differential Equations: Piecewise Forcing Functions

1. Initial Value Problem

\[ y'' + y = \begin{cases} 1 & 0 \le t < 3\pi \\ 0 & 3\pi \le t < \infty \end{cases} \]

Note: The solution form may involve \( R \cos(\omega_0 t - \delta) \).

Laplace Transform Solution

After applying the Laplace transform and solving for \( Y(s) \):

\[ Y = \frac{1}{s^2+1} + \frac{1}{s} - \frac{s}{s^2+1} - e^{-3\pi s} \left( \frac{1}{s} - \frac{s}{s^2+1} \right) \]

Taking the inverse Laplace transform:

\[ y = \sin t + 1 - \cos t - u_{3\pi}(t) (1 - \cos(t - 3\pi)) \]

Recall the identity: \( \cos(t - \pi) = -\cos t \)

A hand-drawn graph showing a periodic wave starting at t=0, with points marked at pi/2, pi, 3pi/2, and 2pi.
PAGE 2

Differential Equations: Ramp Forcing Function

9. Initial Value Problem

\[ y'' + y = \begin{cases} t/2 & 0 \le t < 6 \\ 3 & t \ge 6 \end{cases} \]

Initial conditions: \( y(0) = 0, y'(0) = 1 \)

A graph showing a linear ramp from the origin to (6, 3), where it becomes a horizontal line.

Step Function Representation

Expressing the forcing function using the unit step function \( u_6(t) \):

\[ = \frac{1}{2}t + u_6(t) \left( -\frac{1}{2}t + 3 \right) \]

Shifting by 6 units: \( -\frac{1}{2}t + 3 \rightarrow -\frac{1}{2}(t+6) + 3 = -\frac{1}{2}t \)

Solving the Equation

Applying the Laplace transform:

\[ s^2 Y - s y(0) - y'(0) + Y = \frac{1}{2s^2} + e^{-6s} \left( -\frac{1}{2s^2} \right) \]
\[ (s^2 + 1) Y = 1 + \frac{1}{2s^2} + e^{-6s} \left( -\frac{1}{2s^2} \right) \]
\[ Y = \frac{1}{s^2+1} + \frac{1}{2s^2(s^2+1)} - e^{-6s} \frac{1}{2s^2(s^2+1)} \]
PAGE 3

Differential Equation Solution

12. \( y^{(4)} - y = u_1(t) - u_2(t) \) with initial conditions \( y(0) = y'(0) = y''(0) = y'''(0) = 0 \)

Taking the Laplace transform:

\[ (s^4 - 1)Y = \frac{e^{-s}}{s} - \frac{e^{-2s}}{s} \]

Solving for \( Y \):

\[ Y = \frac{e^{-s}}{s(s^4 - 1)} - \frac{e^{-2s}}{s(s^4 - 1)} \]

Note on partial fraction decomposition term:

\[ \frac{1}{s(s^2+1)(s-1)(s+1)} \]
PAGE 4

6.5 Impulse Function

Impulse: short-acting force (e.g. bat hitting baseball)

Model with Step Functions

Consider a rectangular pulse defined by:

  • Step up at \( t = -a \)
  • Step down at \( t = a \)
  • Rectangle area = 1
Graph of a rectangular pulse f(t) centered at the origin with height 1/(2a) and width from -a to a.
\[ f(t) = \frac{1}{2a} u_{-a}(t) - \frac{1}{2a} u_a(t) \]

Limiting Case

Now let \( a \to 0 \), keeping area 1.

Sequence of narrowing and taller rectangular pulses, all with area 1, as a approaches 0.
The limit as a goes to 0: an infinitely tall and thin spike at the origin, representing the impulse function.
PAGE 5

The Unit Impulse Function

This is called the unit impulse function or Dirac delta function.

\[ \delta(t) = 0, \quad t \neq 0 \]

but

\[ \int_{-\infty}^{\infty} \delta(t) \, dt = 1 \]

Time-Shifted Impulse

\( \delta(t - t_0) \) puts the impulse at \( t = t_0 \).

\[ \delta(t - t_0) = 0, \quad t \neq t_0 \]\[ \int_{-\infty}^{\infty} \delta(t - t_0) \, dt = 1 \]
Graph of f(t) vs t showing a vertical arrow at t=t0 representing the Dirac delta impulse.
PAGE 6
\[ \mathcal{L} \{ \delta(t - t_0) \} = e^{-t_0 s} \]

Note similarity and difference to \( \mathcal{L} \{ u_c(t) \} = \frac{e^{-cs}}{s} \)

Example

Solve the initial value problem:

\[ y'' + 4y = \delta(t - \pi), \quad y(0) = y'(0) = 0 \]

Taking the Laplace transform of both sides:

\[ s^2 Y + 4Y = e^{-\pi s} \]\[ Y = e^{-\pi s} \frac{1}{s^2 + 4} \]

Note that the inverse transform of \( \frac{1}{s^2+4} \) is \( \frac{1}{2} \sin 2t \). Applying the second shifting theorem:

\[ y(t) = u_{\pi}(t) \left[ \frac{1}{2} \sin 2(t - \pi) \right] \]\[ y(t) = \begin{cases} 0 & t < \pi \\ \frac{1}{2} \sin 2(t - \pi) = \frac{1}{2} \sin 2t & t \geq \pi \end{cases} \]
PAGE 7

Differential Equations: Impulse Response Example

Page 7

Example: Second-Order ODE with Dirac Delta Functions

Consider the following initial value problem involving two impulse functions:

\[ y'' + 4y = \delta(t - \pi) - \delta(t - 2\pi), \quad y(0) = y'(0) = 0 \]
Graph of y(t) vs t. It is zero until t=pi, then a sine wave pulse between pi and 2pi, then zero again.

Laplace Transform Solution

Taking the Laplace transform of both sides:

\[ (s^2 + 4)Y = e^{-\pi s} - e^{-2\pi s} \]

Solving for \( Y \):

\[ Y = e^{-\pi s} \frac{1}{s^2 + 4} - e^{-2\pi s} \frac{1}{s^2 + 4} \]

Inverse Laplace Transform

Note on periodicity (\( \text{period} = \pi \)):

  • \( \sin 2(t - \pi) = \sin(2t - 2\pi) = \sin 2t \)
  • \( \sin 2(t - 2\pi) = \sin(2t - 4\pi) = \sin 2t \)

Applying the second shifting theorem:

\[ y = u_{\pi}(t) \cdot \frac{1}{2} \sin 2(t - \pi) - u_{2\pi}(t) \cdot \frac{1}{2} \sin 2(t - 2\pi) \] \[ = u_{\pi}(t) \cdot \frac{1}{2} \sin 2t - u_{2\pi}(t) \cdot \frac{1}{2} \sin 2t \]

Expressed as a piecewise function:

\[ y = \begin{cases} 0 & t < \pi \\ \frac{1}{2} \sin 2t & \pi \leq t < 2\pi \\ 0 & t \geq 2\pi \end{cases} \]
PAGE 8

Differential Equations: Forced Response with Impulse

Page 8

Example: Forced Damped Oscillator

Solve the following ODE with a sinusoidal forcing term and a delayed impulse:

\[ y'' + 2y' + 3y = \sin t + \delta(t - 3\pi), \quad y(0) = y'(0) = 0 \]
Graph of y(t) vs t. Shows a damped oscillation starting at t=pi and another smaller one at t=2pi.

Laplace Transform and Partial Fractions

\[ (s^2 + 2s + 3)Y = \frac{1}{s^2 + 1} + e^{-3\pi s} \] \[ Y = \frac{1}{(s^2 + 1)(s^2 + 2s + 3)} + e^{-3\pi s} \frac{1}{s^2 + 2s + 3} \]

Expanding the first term using partial fraction decomposition:

\[ Y = \frac{1}{4} \frac{1}{s^2 + 1} - \frac{1}{4} \frac{s}{s^2 + 1} + \frac{1}{4} \frac{s + 1}{s^2 + 2s + 3} + e^{-3\pi s} \frac{1}{s^2 + 2s + 3} \]

Inverse Transform Components

Term 1 & 2:

\( \frac{1}{s^2 + 1} \rightarrow \sin t \)

\( \frac{s}{s^2 + 1} \rightarrow \cos t \)

Term 3 (Completing the Square):

\( \frac{s + 1}{s^2 + 2s + 3} = \frac{s + 1}{(s + 1)^2 + 2} \rightarrow e^{-t} \cos \sqrt{2}t \)

Term 4 (Impulse Response):

\( \frac{1}{s^2 + 2s + 3} = \frac{1}{(s + 1)^2 + 2} \rightarrow \frac{1}{\sqrt{2}} e^{-t} \sin \sqrt{2}t \)

PAGE 9

Solution Decomposition and Piecewise Form

The solution for \( y \) is composed of three distinct parts based on the input functions and initial conditions:

\[ y = \underbrace{\left( \frac{1}{4} \sin t - \frac{1}{4} \cos t \right)}_{\text{particular due to } \sin t} + \underbrace{\left( \frac{1}{4} e^{-t} \cos \sqrt{2} t \right)}_{\text{homogeneous w/ IC's}} + \underbrace{u_{3\pi}(t) \frac{1}{\sqrt{2}} e^{-(t-3\pi)} \sin \sqrt{2}(t-3\pi)}_{\text{particular due to } \delta(t-3\pi)} \]

Piecewise Representation

Expressing the solution as a piecewise function for different time intervals:

\[ y = \begin{cases} \frac{1}{4} \sin t - \frac{1}{4} \cos t + \frac{1}{4} e^{-t} \cos \sqrt{2} t & t < 3\pi \\ \\ \frac{1}{4} \sin t - \frac{1}{4} \cos t + \frac{1}{4} e^{-t} \cos \sqrt{2} t + \frac{1}{\sqrt{2}} e^{-(t-3\pi)} \sin \sqrt{2}(t-3\pi) & t \geq 3\pi \end{cases} \]
PAGE 10

Graphical Analysis of the Solution

The following graph illustrates the behavior of the solution \( y(t) \) over time. Note the transition point at \( t = 3\pi \approx 9.42 \), where the impulse function \( \delta(t-3\pi) \) introduces a sudden change in the oscillation pattern.

The red dot on the graph highlights this critical junction, showing the impact of the particular solution component triggered by the unit step function.

A plot of an oscillating function with a red dot at t ≈ 9.42, showing a sharp change in the wave's amplitude.
Figure 1: Plot of the piecewise solution showing the impulse response at \( t = 3\pi \).